from django.contrib import admin
from l2ldjango.apps.blog.models import *

def make_published(modeladmin, request, queryset):
    queryset.update(status='3')
make_published.short_description = "Mark selected Blogs as published"


class blogAdmin(admin.ModelAdmin):
    list_per_page=10
    ordering=['title',]
    #fields=('title','slug','status',)
    list_display = ('title','slug','status','category',)
    list_filter = ('status', 'category')
    actions = [make_published]
    
    #exclude=('slug','comments',)
    fields=('title','category','content','status','comment_enabled','description','keywords')
admin.site.register(Blog,blogAdmin)



